/*
 * CommonUtilities.h
 *
 *  Created on: Jan 23, 2012
 *      Author: hduser
 */

#ifndef COMMONUTILITIES_H_
#define COMMONUTILITIES_H_

#include <time.h>
#include <stdio.h>
#include <string>
#include <sstream>

using namespace std;

namespace utilities {

class CommonUtilities {
public:
	CommonUtilities();
	virtual ~CommonUtilities();
	char* getTimeString(time_t rawtime, char* buffer, int bufferSize);
	bool isUpdated(time_t Modified, size_t fileSize, char* lastModified, size_t lastFileSize);
	time_t getTimeFromString(char* stime);
	int size(char *ptr);
	string to_string(int i);
	string replace(string source, string from, string to);
};

}

#endif /* COMMONUTILITIES_H_ */
